]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionPrefs: Ensure up-to-date release version in metainfo
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 22 Mar 2020 17:00:00 +0000 (18:00 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Wed, 25 Mar 2020 19:56:52 +0000 (19:56 +0000)
It's easy to forget to add a new <release> tag to the metainfo when
doing a new release.

Address this with an additional test if appstream-util is recent
enough to include the new validate-version command, so distcheck
fails when the metainfo wasn't updated.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1117

js/extensionPrefs/data/metainfo/meson.build

index 932651fbc93daa5729dc561fe9a51063224b7005..a144a56d038bbb666650fe5445752a8973e84fe6 100644 (file)
@@ -13,4 +13,13 @@ if (appstream_util.found())
     args: ['validate', '--nonet', metainfo],
     workdir: meson.current_build_dir()
   )
+
+  r = run_command(appstream_util, '--help')
+  if (r.stdout().contains('validate-version'))
+    test('Checking release entry for @0@'.format(meson.project_version()),
+      appstream_util,
+      args: ['validate-version', metainfo, meson.project_version()],
+      workdir: meson.current_build_dir()
+    )
+  endif
 endif